<?php

namespace Common\Model;
use Think\Model\RelationModel;

/**
 * 设计师团队模型
 */
class DesignerModel extends RelationModel{
    
     protected $_auto = array(
        array('add_time', 'time', self::MODEL_INSERT, 'function'), // 对add_time字段在添加的时候写入当前时间戳
    );
     protected $_link = array(
        'Store' => array(
            'mapping_type' => self::BELONGS_TO,
            'class_name' => 'Store',
            'foreign_key' => 'sid',
            'mapping_name' => 'store',
            'mapping_fields' => 'sname',
            'as_fields' => 'sname'
        ),'designer_type' => array(
             'mapping_type' => self::BELONGS_TO,
             'class_name' => 'designer_type',
             'foreign_key' => 'tid',
             'mapping_name' => 'type',
             'mapping_fields' => 'tname',
             'as_fields' => 'tname'
         ),

    );
    
}

?>
